package cn.liuyi.weiyi.adapter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
import cn.edu.pku.tools.BitmapHelper;
import cn.edu.pku.tools.RegistrationInfo;
import cn.edu.pku.tools.TransactionRecord;
import cn.liuyi.weiyi.R;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.BitmapFactory;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.BaseExpandableListAdapter;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

/**
 * @author vector
 *
 */
public class FilterDetailAdapter extends BaseAdapter{

	Context context;
	LayoutInflater inflater;
	String[] filter_category_detail = new String[]{"东城区","西城区","海淀区","朝阳区","丰台区","石景山区","房山区","通州"};

	public FilterDetailAdapter(Context context) {
		this.context = context;
		inflater = LayoutInflater.from(context);
	}

	@Override
	public int getCount() {
		
		//return doctors.length();
		return filter_category_detail.length;
	}

	@Override
	public Object getItem(int position) {
		return filter_category_detail[position];
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder;
		if(convertView == null){
			holder = new ViewHolder();
			convertView = inflater.inflate(R.layout.filter_detail_item, parent,false);
			holder.category_tv = (TextView) convertView.findViewById(R.id.category_detail_tv);
			holder.check_box = (CheckBox) convertView.findViewById(R.id.check_box);
			convertView.setTag(holder);
		}else{
			holder = (ViewHolder) convertView.getTag();
		}
		holder.category_tv.setText(filter_category_detail[position]);
		return convertView;
	}

    class ViewHolder {
        TextView category_tv;
        CheckBox check_box;
    }
	
}
